/*
 * @Description: 
 * @Author: wangqi
 * @Date: 2021-03-05 11:12:09
 * @LastEditTime: 2021-03-18 17:54:09
 */
const path = require('path');
const express = require('express');
const webpack = require('webpack');
const middleware = require('webpack-dev-middleware');
const config = require('./webpack.dev');
let compiler = webpack(config);

const app = express();
// app.use(middleware(compiler));
// app.use('/user', (req, res) => {
//     res.send({ name: '我是user接口的数据' });
// });
app.use(express.static(path.join(__dirname, 'dist'), { maxAge: 1000 * 36000 }));

app.listen(3000, () => {
    console.log(`启动服务器成功： 127.0.0.1:3000`);
});







